<?php 

$sql = "SELECT
                     p.cover,
					 p.cover_class,
                     d.title,
					 d.description,
					 d.meta_key,
			 		 d.meta_description
                FROM
                    projects AS p,
                    project_description AS d
                WHERE
                	p.project_id = d.project_id
                    
                    AND
                    
                    d.lang_id = '".$_SESSION['lang_id']."'
                    
                    AND
                    
					p.published
					
					AND p.project_id = '".$sef_url."'
                    
                  ";

$result = query($sql);
$row = mysql_fetch_object($result);

head(sth($row->title),sth($row->meta_description),'','projects');


?>
<div class="wrapper-project cf">
        <header id="header" class="cf">
            <a href="#" onclick="window.history.back(); return false;" ><div id="back-button"></div></a>
            <div id="logo"></div>
            <div id="menu-icon"></div>
        </header> <!--# header-->
        
         
        <section id="content-project" class="cf">
            <article id="project" class="cf">
                <h1><?=stripslashes($row->title)?></h1>
                <div id="grid" class="cf">
                    <a href="<?=HTML_BASE?>project_images/big/<?=$row->cover?>" class="item <?=$row->cover_class?>"  style="background-image: url(<?=HTML_BASE?>project_images/medium/<?=$row->cover?>);" rel="prettyPhoto[pp_gal]"></a>              
                    <?php
                        		$sql = "SELECT g.file, g.image_class, d.description  FROM
										project_gallery AS g,
										project_gallery_description AS d
									WHERE
			  							g.project_id = '".$sef_url."'
									AND
										g.id = d.image_id
									AND
										d.lang_id = '".$_SESSION['lang_id']."'
									
									ORDER BY g.order_number DESC";
								$result = query($sql);
						
						while ($rowg = mysql_fetch_object($result)) {
						?>                 
                    <a href="<?=HTML_BASE?>project_images/gallery/big_<?=$rowg->file?>" title="<?=$rowg->description?>" class="item <?=$rowg->image_class?>"  style="background-image: url(<?=HTML_BASE?>project_images/gallery/<?=$rowg->file?>);" rel="prettyPhoto[pp_gal]"></a>
                    <?php }?>
                    <div class="shuffle-sizer"></div>
                </div>
                <div id="description">
                        <p><?=stripslashes($row->description)?></p>
                    </div>
            </article>
        </section> <!--# content--> 
        
      
				 
		



		

<?php
foot();
?>